#include <stdio.h>
#define A 11

int main()
{
	int a[3],i,sum;
	printf("Please enter three card numbers: \n");
	for (i=0;i<3;i++)
	{
		scanf("%d",&a[i]); 
		if( a[i]==11 ||a[i]==12 ||a[i]==13 )
		a[i]=10;
	    if(a[i]==1)
		a[i]=A;
    }
    sum = a[0]+a[1]+a[2];
    if(sum<=21)
    {
	  printf("The scores are: %d",sum);
    }
	else 
	{
		for(i=0;i<3;i++)
		{
			if(a[i]==11)
			a[i]=1;
		}
	    sum = a[0]+a[1]+a[2]; 
	    printf("The scores are: %d",sum);
	} 	  
	return 0;
	  
 } 
